interface IKun {
  name: string;
  age: number;
  slogan: string;

  playBasketball: () => void;
}

interface IRun {
  running: () => void;
}

// 作用：直接作为类型使用
const ikun: IKun = {
  name: "why",
  age: 12,
  slogan: "111",
  playBasketball: () => {},
};

// 作用：接口被类实现
class Person implements IKun, IRun {
  constructor(public name: string, public age: number, public slogan: string) {
    this.name = name;
    this.age = age;
    this.slogan = slogan;
  }

  playBasketball() {}
  running() {}
}

export {};
